home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / Replacements / AKCC35.lha / Programmers / Examples / WildCmp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-30  |  1.1 KB  |  43 lines

  1.  
  2.  /* WildCmp V37.3                                              */
  3.  /* FREEWARE.                                                  */
  4.  /* (c) 1993-94 by Andreas R. Kleinert.                        */
  5.  /* Demonstrates use of the WildCard-Function.                 */
  6.  /* Written in SAS/C V6.51.                                    */
  7.  
  8. #include <akcc_gen0/akcc_gen0_pragma.h>
  9.  
  10. #include <stdlib.h>
  11.  
  12. #include <proto/exec.h>
  13.  
  14.  
  15. struct AKCCBase *AKCCBase = N;
  16.  
  17. void main(long argc, char **argv)
  18. {
  19.  printf("\nWildCmp V37.3, FREEWARE, (c) 1993-94 by Andreas R. Kleinert.\n");
  20.  
  21.  AKCCBase = (struct AKCCBase *) OpenLibrary("akcc_gen0.library", 37);
  22.  if(AKCCBase)
  23.   {
  24.    char wild_string[256], orig_string[256];
  25.  
  26.    printf("\nEnter a WildCard string :");
  27.    scanf("%s", wild_string);
  28.  
  29.    printf("Enter string to compare with the WildCard string :");
  30.    scanf("%s", orig_string);
  31.  
  32.    if(AKCC_WildCmp(orig_string, wild_string)==TRUE) printf("\nThe pattern fits.\n");
  33.     else                                            printf("\nThe pattern does not match.\n");
  34.  
  35.    CloseLibrary((APTR) AKCCBase);
  36.   }else
  37.   {
  38.    printf("\n Can't open \42akcc_gen0.library\42 V37+ !\n");
  39.   }
  40.  
  41.  exit(0);
  42. }
  43.